package com.platform.springcloud.controller;

import com.platform.springcloud.api.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

    @Autowired
    private TestService testService;

    @RequestMapping("/getName")
    public String getName(@RequestParam String name) {
        System.out.println("服务调用 cloud-consumer 7001");
        return testService.getName(name);
    }

}
